package org.adorsys.aderp.jpa.api.audit;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Contains information on the audit record class of an entity.
 * 
 * @author francis
 *
 */
@Documented
@Target({TYPE})
@Retention(RUNTIME)
public @interface AuditRecord {

	/**
	 * Defines the record jpa class.
	 * 
	 * @return
	 */
	Class<? extends AbstractAuditRecord> recordClass();

	/**
	 * The repository class.
	 * @return
	 */
	Class<? extends JpaRepository<?, Long>> recordRepositoryClass();

	Class<? extends AuditRecordBuilder> recordBuilderClass() default AbstractAuditRecordBuilder.class;
}
